# /etc/profile
# Written for Beyond Linux From Scratch
# by James Robertson <jameswrobertson@earthlink.net>
# modifications by Dagmar d'Surreal <rivyqntzne@pbzpnfg.arg>
# modifications by zy.sunshine <zy.netsec@gmail.com>

# System wide environment variables and startup programs should go into
# /etc/profile.

# System wide aliases and functions should go in /etc/bashrc. 
# Personal environment variables and startup programs should go into
# ~/.bash_profile. 
# Personal aliases and functions should go into ~/.bashrc.

# Provides a colored /bin/ls command.   Used in conjunction with code in
# /etc/profile.

alias ls='ls --color=auto'

# Provides prompt for non-login shells, specifically shells started
# in the X environment. [Review the LFS archive thread titled
# PS1 Environment Variable for a great case study behind this script
# addendum.]

NORMAL="\[\e[0m\]"
RED="\[\e[1;31m\]"
GREEN="\[\e[1;32m\]"
if [[ $EUID == 0 ]] ; then
    PS1="$RED\u [ $NORMAL\w$RED ]# $NORMAL"
else
    PS1="$GREEN\u [ $NORMAL\w$GREEN ]\$ $NORMAL"
fi

